﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucInstructionRecvFileDetail.ascx.cs" Inherits="RecvFile_ucInstructionRecvFileDetail" %>
<%@ Register Assembly="YYWebControl" Namespace="YYWebControl.YYSimpleCalendar" TagPrefix="YYWebControl" %>
<script language="javascript" type="text/javascript">
    var id_CustomerName = '<%= txtCustomer.ClientID %>';
    var id_hfCustomerID = '<%= hfCustomerID.ClientID %>';

    function openSearchCustomerDialog() {
        var url = "Customer/GetCustomerDlg.aspx";
        if (window.parent && window.parent.document && window.parent.document.openDialog) {
            window.parent.document.openDialog(url, "选择客户", getCustomerCallBack, 700, 400);
        }
    }
    function getCustomerCallBack(type, key, value) {
        if (type == 1) {
            getx(id_hfCustomerID).value = value.id;
            getx(id_CustomerName).value = value.name;
        }
    }
    function addNewCustomer() {
        var url = "Customer/AddCustomerSimpleDlg.aspx";
        window.parent.document.openDialog(url, "快速添加客户", addNewCustomerCallback, 800, 500);

    }
    function addNewCustomerCallback(type, key, value) {
        if (type == 1) {
            getx(id_hfCustomerID).value = value.id;
            getx(id_CustomerName).value = value.name;
        }
    }
</script>

<table style="width:99%;">
    <tr style="height:1px; line-height:1px;">
        <td style="width:80px;"></td>
        <td style="width:200px;"></td>
        <td></td>
    </tr>
    <tr>
        <td>收文名称</td>
        <td><asp:TextBox runat="server" ID="txtRFName" CssClass="conint" Width="300px" ReadOnly="true"></asp:TextBox>
            <asp:HiddenField runat="server" ID="hfRFIndex" />
        </td>
        <td><asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                runat="server" ErrorMessage="必需选择一个收文" ControlToValidate="txtRFName" 
                Display="Dynamic" EnableViewState="False" SetFocusOnError="True" 
                ValidationGroup="submit"></asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td>立卷任务分配给</td>
        <td>
            <asp:DropDownList runat="server" ID="drpAssignedUser" Width="120px" 
                ondatabound="drpAssignedUser_DataBound"></asp:DropDownList>
        </td>
        <td></td>
    </tr>
    <tr>
        <td>收文日</td>
        <td><YYWebControl:YYSimpleCalendar ID="txtRFDate" runat="server" CssClass="conint singleline" />
        </td>
        <td><asp:RequiredFieldValidator ID="RequiredFieldValidator2" 
                runat="server" ErrorMessage="必填" ControlToValidate="txtRFDate" 
                Display="Dynamic" EnableViewState="False" SetFocusOnError="true"
                ValidationGroup="submit"></asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td>发文日</td>
        <td><YYWebControl:YYSimpleCalendar ID="txtSentFileDate" runat="server" CssClass="conint singleline" />
        </td>
        <td></td>
    </tr>
    <tr>
        <td>回复日</td>
        <td><YYWebControl:YYSimpleCalendar ID="txtAnswerDate" runat="server" CssClass="conint singleline" ReadOnly="true" />
        </td>
        <td></td>
    </tr>
    <tr>
        <td>客户</td>
        <td>
            <asp:TextBox runat="server" ID="txtCustomer" CssClass="conint singleline" ReadOnly="true"></asp:TextBox>
            <asp:HiddenField runat="server" ID="hfCustomerID" />
            <%if (!IsInEditMode) {%>
            <a href="javascript:openSearchCustomerDialog();">选择</a>
            <a href="javascript:addNewCustomer();">快速新建客户</a>
            <%} %>
        </td>
        <td><asp:RequiredFieldValidator ID="RequiredFieldValidator3" 
                runat="server" ErrorMessage="必需选择一个客户" ControlToValidate="txtCustomer" 
                Display="Dynamic" EnableViewState="False" SetFocusOnError="true"
                ValidationGroup="submit"></asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td>收文内容</td>
        <td>
        </td>
        <td></td>
    </tr>
</table>
<asp:TextBox runat="server" ID="txtContent" TextMode="MultiLine" CssClass="textarea01"></asp:TextBox>
<asp:Literal runat="server" ID="ltrEditor"></asp:Literal>

